php forum
php mysql forum
php mysql smarty
 
Topic Options
#203379 - 02/01/05 10:55 PM [6.7] [beta] Anti-Spam I (No Replies Unless Someone Else Has Replied)
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Modification Name: Anti-Spam I (No Replies Unless Someone Else Has Replied)

Author(s): AllenAyres

Description: This mod keeps someone from replying to their own post unless someone else has replied first - works great for those ADHD users who repeat nonsense all day long. smile

Demo: none

Requirements: 6.7.2

Download Link: none

Credits: Original Version by Graeme

Open ubb_new_reply.cgi and find:

Code:
	# grab last post
	@rev_this_topic = reverse(@this_topic);
	@last_post      = split (/||/, $rev_this_topic[0]);
	$last_post_num  = $last_post[1];
	$last_post_num++;
add after:

Code:
	# Stop Spam Replies
	if ($username eq $last_post[2]) {
	&StandardHTML("You cannot reply to this thread again until someone else does.");
	}
	
Update, thanks to LK smile

If you still want admins and moderators to be able to reply to their own posts, change the above code to this:

Code:
### Stop Spam Replies
@user_profile = &OpenProfile($user_number);
my $is_admin_mod = &boolean_is_admin_or_mod($in{f}, @user_profile);
if ($username eq $last_post[2] && !$is_admin_mod) {
&StandardHTML("You cannot reply to this thread again until someone else does.");
}
###
_________________________
- Allen wavey
- What Drives You?

Top
#203380 - 03/24/05 10:40 PM Re: [6.7] [beta] Anti-Spam I (No Replies Unless Someone Else Has Replied)
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Code updated to include the ability for admins and moderators to still be able to reply to their own posts. Thanks LK thumbsup

Future updates will include a time limit before being able to reply. smile
_________________________
- Allen wavey
- What Drives You?

Top
#203381 - 07/14/05 06:32 PM Re: [6.7] [beta] Anti-Spam I (No Replies Unless Someone Else Has Replied)
Jango Offline
User

Registered: 05/14/01
Posts: 42
Loc: Buenos Aires, Argentina
Hi, it sounds really usefull, AllenAyres does it work in 6.6.0?

Top
#203382 - 07/14/05 06:34 PM Re: [6.7] [beta] Anti-Spam I (No Replies Unless Someone Else Has Replied)
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
I think it should, try it and let us know smile
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#203383 - 07/18/05 12:05 AM Re: [6.7] [beta] Anti-Spam I (No Replies Unless Someone Else Has Replied)
Jango Offline
User

Registered: 05/14/01
Posts: 42
Loc: Buenos Aires, Argentina
I've tested it on my 6.6.0 and it works, but the message "You cannot reply to this thread again until someone else does" appears right after the user hits "add reply" in the message text box, just imagine this: a user writes a very long message without knowing this and the message appears, it would be better if the message "You cannot reply to this thread again until someone else does" appears right after someone hits the post reply icon instead of being able to see the text box and enter text on it. It's really usefull, but it would be better that way, could it be done?

Top
#203384 - 07/18/05 05:16 AM Re: [6.7] [beta] Anti-Spam I (No Replies Unless Someone Else Has Replied)
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
You're right..

Try the following (untested) in ubb_new_reply.cgi:
Find the first instance of:
Code:
	# grab topic
	@this_topic = &OpenTopic($in{t}, $in{f});
	if(!@this_topic) { &StandardHTML($vars_wordlets_err{topic_doesnt_exist}) }
Add below:
Code:
	# grab last post
	@rev_this_topic = reverse(@this_topic);
	@last_post      = split (/||/, $rev_this_topic[0]);
	# Stop Spam Replies
	if ($username eq $last_post[2]) {
	&StandardHTML("You cannot reply to this thread again until someone else does.");
	}
Another thing you can do is add "$in{message}" into StandardHTML, then the users will be able to see their post when they get the error.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top



Moderator:  Charles, Gizmo 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks